<template>
  <div class="arrow-down" :style="{backgroundImage: 'url(' + bg + ')'}">
    <img :src="require('../assets/imgs/common/arrow.png')" alt="">
  </div>
</template>

<script>
  export default {
    name: 'BottomArrow',
    props: {
      type: {
        type: Number,
        default: 0
      }
    },
    computed: {
      bg() {
        return this.type === 1 ? require('../assets/imgs/common/home_down.png') : require('../assets/imgs/common/down.png');
      }
    }
  };
</script>

<style lang="less">
  .arrow-down {
    position: absolute;
    top: -80px;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 86px;
    background-position: bottom;
    background-repeat: no-repeat;
    background-size: cover;
    img {
      width: 16px;
      position: absolute;
      bottom: 45px;
      left: 50%;
      transform: translateX(-50%);
    }
  }
</style>
